package javaweb_work01.classesContrl.Service;

import javaweb_work01.classesContrl.Dao.CountClassesDao;
import javaweb_work01.classesContrl.Factory.ClassesFactory;

public class CountClassesService {
    //合成复用原则
    private CountClassesDao countClassesDao;

    public CountClassesService(){
        this.countClassesDao = ClassesFactory.getCountClassesDao();
    }

    /**
     * 自定义成员方法实现得到班级总数功能
     * @return
     */
    public int countClassesService(){
        return countClassesDao.countClasses();
    }
}
